<?php
/**
 *
 * 版权所有：恰维网络<qwadmin.qiawei.com>
 * 作    者：寒川<hanchuan@qiawei.com>
 * 日    期：2016-01-21
 * 版    本：1.0.0
 * 功能说明：前台控制器演示。
 *
 **/
namespace Home\Controller;

use Vendor\Page;

class TeacherController extends ComController
{
    //明星教师列表
    public function index(){
        $uid = I('get.uid');
        $teacher = M('member')
                ->join(" sc_class_type as c on c.id = sc_member.class_id","LEFT")
                ->join(" sc_class as b on b.class_type = c.id","LEFT")
                ->field(" sc_member.uid,sc_member.teacher_type,sc_member.phone,sc_member.name,sc_member.head,c.name as c_name,b.name as b_name ")
                ->where(array('sc_member.pid'=>$uid,'sc_member.level'=>2))->select();
        $this->assign('teacher',$teacher);
        $this->display();
    }
}